<template>
  <div class="about">
    <span @click="$router.back()">返回</span>
    <span @click="$router.go(-1)">返回</span>
    <h1>{{ obj.id }}</h1>

    <van-loading
      class="loading"
      v-show="show"
      type="spinner"
      size="150px"
      color="red"
    />
    <ul>
      <li v-for="item in list" :key="item.id">{{ item.name }}</li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: true,
      list: [],

      obj: this.$route.query.obj,
    };
  },
  mounted() {
    this.$axios
      .get("http://shop.bufantec.com/bufan/goods/goodsList?categoryId=1005000")
      .then((res) => {
        console.log(res);
        this.list = res.data.data;
        this.show = false;
      });
  },
};
</script>
<style lang="scss">
.loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
</style>
